const Koa = require('koa');
const ejs = require('koa-ejs');
const path = require('path');
let server = new Koa();
server.listen(8888);
ejs(server, {
    root: path.resolve(__dirname, './template'),
    layout: false,
    viewExt: 'ejs',
    cache: false,
    debug: false
})

server.use(async cxt => {
    await cxt.render('a', { arr: [3, 5, 3, 64], name: 'blue' });
})